/**
 * 
 */
package cn.nawang.ebeim.api.bean;

import java.util.Map;

import cn.nawang.ebeim.api.utils.Constant;
import cn.nawang.ebeim.api.utils.DateUtils;

/**
 * @ClassName: DateSourceBean
 * @Description: TODO
 * @author 张建峰
 * @date 2015年8月7日 下午5:31:06
 * @version v1.0
 */
public class DatasourceBean {

  private String id;
  private String customerId;
  private String terminalId;
  private String name;
  private String createUserId;
  private Long createTime;
  private String createTimeStr;
  private String description;
  private Integer isOpenLocalBackup;
  private String dsType;
  private Integer dsSecurityRank;
  private int status;
  private int dsStatus;
  private String lmUserId;
  private Long lmTime;
  private String lmTimeStr;
  private Long spaceUsage;
  private Long nextRun;
  private String nextRunStr;
  private int count;
  private int currentVersionMajor;
  private int currentVersionMinor;

  private String bindDeviceName;

  private String backupStrategyId;
  private String backupType;
  private Long backupTime;
  private Integer backupTimeStatus;
  private Integer backupCycle;
  private String backupPeriod;

  private String configId;
  private String scanType;
  private String isEncrypt;
  private String root;
  private String scanHideFile;
  private String verifyCompleteName;
  private String verifyCompleteMaxCount;
  private String verifyCompleteTimer;
  private String fileAttrGainer;
  private String recordCanNotReadFileInfo;
  private String recordEmptyDirectory;
  private String recordEmptyFile;
  private String filterFileSuffix;
  private String dbUsername;
  private String dbPassword;
  private String dbType;
  private String dbHost;
  private String dbPort;
  private String dbName;

  private String createUserName;


  public DatasourceBean(String isEncrypt,Integer dsSecurityRank, String id, String customerId, String terminalId,
      String name, String createUserId, Long createTime, String description,
      Integer isOpenLocalBackup, String dsType, int status, String lmUserId, Long lmTime,
      Long spaceUsage, Long nextRun, int count, int currentVersionMajor, int currentVersionMinor,
      String backupStrategyId, String backupType, Long backupTime, Integer backupTimeStatus,
      Integer backupCycle, String backupPeriod, String configId, String scanType, String root,
      String scanHideFile, String verifyCompleteName, String verifyCompleteMaxCount,
      String verifyCompleteTimer, String fileAttrGainer, String recordCanNotReadFileInfo,
      String recordEmptyDirectory, String recordEmptyFile, String filterFileSuffix,
      String dbUsername, String dbPassword, String dbType, String dbHost, String dbPort,
      String dbName, String createUserName, String bindDeviceName,int dsStatus) {
    super();
    this.isEncrypt = isEncrypt;
    this.dsSecurityRank = dsSecurityRank;
    this.id = id;
    this.customerId = customerId;
    this.terminalId = terminalId;
    this.name = name;
    this.createUserId = createUserId;
    this.createTime = createTime;
    this.description = description;
    this.isOpenLocalBackup = isOpenLocalBackup;
    this.dsType = dsType;
    this.status = status;
    this.lmUserId = lmUserId;
    this.lmTime = lmTime;
    this.spaceUsage = spaceUsage;
    this.nextRun = nextRun;
    this.count = count;
    this.currentVersionMajor = currentVersionMajor;
    this.currentVersionMinor = currentVersionMinor;
    this.backupStrategyId = backupStrategyId;
    this.backupType = backupType;
    this.backupTime = backupTime;
    this.backupTimeStatus = backupTimeStatus;
    this.backupCycle = backupCycle;
    this.backupPeriod = backupPeriod;
    this.configId = configId;
    this.scanType = scanType;
    this.root = root;
    this.scanHideFile = scanHideFile;
    this.verifyCompleteName = verifyCompleteName;
    this.verifyCompleteMaxCount = verifyCompleteMaxCount;
    this.verifyCompleteTimer = verifyCompleteTimer;
    this.fileAttrGainer = fileAttrGainer;
    this.recordCanNotReadFileInfo = recordCanNotReadFileInfo;
    this.recordEmptyDirectory = recordEmptyDirectory;
    this.recordEmptyFile = recordEmptyFile;
    this.filterFileSuffix = filterFileSuffix;
    this.dbUsername = dbUsername;
    this.dbPassword = dbPassword;
    this.dbType = dbType;
    this.dbHost = dbHost;
    this.dbPort = dbPort;
    this.dbName = dbName;
    this.createUserName = createUserName;
    this.bindDeviceName = bindDeviceName;
    this.dsStatus = dsStatus;
  }


  public String getIsEncrypt() {
    return isEncrypt;
  }

  public void setIsEncrypt(String isEncrypt) {
    this.isEncrypt = isEncrypt;
  }

  public Integer getDsSecurityRank() {
    return dsSecurityRank;
  }

  public void setDsSecurityRank(Integer dsSecurityRank) {
    this.dsSecurityRank = dsSecurityRank;
  }



  public Integer getIsOpenLocalBackup() {
    return isOpenLocalBackup;
  }

  public void setIsOpenLocalBackup(Integer isOpenLocalBackup) {
    this.isOpenLocalBackup = isOpenLocalBackup;
  }

  public String getConfigId() {
    return configId;
  }

  public void setConfigId(String configId) {
    this.configId = configId;
  }

  public String getScanType() {
    return scanType;
  }

  public void setScanType(String scanType) {
    this.scanType = scanType;
  }

  public String getRoot() {
    return root;
  }

  public void setRoot(String root) {
    this.root = root;
  }

  public String getScanHideFile() {
    return scanHideFile;
  }

  public void setScanHideFile(String scanHideFile) {
    this.scanHideFile = scanHideFile;
  }

  public String getVerifyCompleteName() {
    return verifyCompleteName;
  }

  public void setVerifyCompleteName(String verifyCompleteName) {
    this.verifyCompleteName = verifyCompleteName;
  }

  public String getVerifyCompleteMaxCount() {
    return verifyCompleteMaxCount;
  }

  public void setVerifyCompleteMaxCount(String verifyCompleteMaxCount) {
    this.verifyCompleteMaxCount = verifyCompleteMaxCount;
  }

  public String getVerifyCompleteTimer() {
    return verifyCompleteTimer;
  }

  public void setVerifyCompleteTimer(String verifyCompleteTimer) {
    this.verifyCompleteTimer = verifyCompleteTimer;
  }

  public String getFileAttrGainer() {
    return fileAttrGainer;
  }

  public void setFileAttrGainer(String fileAttrGainer) {
    this.fileAttrGainer = fileAttrGainer;
  }

  public String getRecordCanNotReadFileInfo() {
    return recordCanNotReadFileInfo;
  }

  public void setRecordCanNotReadFileInfo(String recordCanNotReadFileInfo) {
    this.recordCanNotReadFileInfo = recordCanNotReadFileInfo;
  }

  public String getRecordEmptyDirectory() {
    return recordEmptyDirectory;
  }

  public void setRecordEmptyDirectory(String recordEmptyDirectory) {
    this.recordEmptyDirectory = recordEmptyDirectory;
  }

  public String getRecordEmptyFile() {
    return recordEmptyFile;
  }

  public void setRecordEmptyFile(String recordEmptyFile) {
    this.recordEmptyFile = recordEmptyFile;
  }

  public String getFilterFileSuffix() {
    return filterFileSuffix;
  }

  public void setFilterFileSuffix(String filterFileSuffix) {
    this.filterFileSuffix = filterFileSuffix;
  }

  public String getDbUsername() {
    return dbUsername;
  }

  public void setDbUsername(String dbUsername) {
    this.dbUsername = dbUsername;
  }

  public String getDbPassword() {
    return dbPassword;
  }

  public void setDbPassword(String dbPassword) {
    this.dbPassword = dbPassword;
  }

  public String getDbType() {
    return dbType;
  }

  public void setDbType(String dbType) {
    this.dbType = dbType;
  }

  public String getDbHost() {
    return dbHost;
  }

  public void setDbHost(String dbHost) {
    this.dbHost = dbHost;
  }

  public String getDbPort() {
    return dbPort;
  }

  public void setDbPort(String dbPort) {
    this.dbPort = dbPort;
  }

  public String getDbName() {
    return dbName;
  }

  public void setDbName(String dbName) {
    this.dbName = dbName;
  }

  public Long getSpaceUsage() {
    return spaceUsage;
  }

  public void setSpaceUsage(Long spaceUsage) {
    this.spaceUsage = spaceUsage;
  }

  public Long getNextRun() {
    return nextRun;
  }

  public void setNextRun(Long nextRun) {
    this.nextRun = nextRun;
  }

  public int getCount() {
    return count;
  }

  public void setCount(int count) {
    this.count = count;
  }

  public int getCurrentVersionMajor() {
    return currentVersionMajor;
  }

  public void setCurrentVersionMajor(int currentVersionMajor) {
    this.currentVersionMajor = currentVersionMajor;
  }

  public int getCurrentVersionMinor() {
    return currentVersionMinor;
  }

  public void setCurrentVersionMinor(int currentVersionMinor) {
    this.currentVersionMinor = currentVersionMinor;
  }

  public String getBindDeviceName() {
    return bindDeviceName;
  }


  public void setBindDeviceName(String bindDeviceName) {
    this.bindDeviceName = bindDeviceName;
  }



  private final Map<Integer, String> dataSourceRunStatusMap = Constant.DATESOURCE_RUN_STATUS_TYPE;
  private final Map<Integer, String> datasourceDsStatusMap = Constant.DATESOURCE_DS_STATUS_TYPE;
  private final Map<String, String> dataSourceTypeMap = Constant.DATESOURCE_TYPE;
  private final Map<String, String> backupTypeMap = Constant.BACKUP_TYPE;
  private final Map<String, String> backupPeriodMap = Constant.BACKUP_PERIOD;
  private final Map<String, String> backupTimeStatusMap = Constant.BACKUP_TIME_STATUS;



  public DatasourceBean() {}

  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public String getCustomerId() {
    return customerId;
  }

  public void setCustomerId(String customerId) {
    this.customerId = customerId;
  }

  public String getTerminalId() {
    return terminalId;
  }

  public void setTerminalId(String terminalId) {
    this.terminalId = terminalId;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getCreateUserId() {
    return createUserId;
  }

  public void setCreateUserId(String createUserId) {
    this.createUserId = createUserId;
  }

  public Long getCreateTime() {
    return createTime;
  }

  public void setCreateTime(Long createTime) {
    this.createTime = createTime;
  }

  public String getCreateTimeStr() {
    if (this.getCreateTime() == null) {
      return "";
    }
    return DateUtils.longTime2String(this.getCreateTime());
  }

  public void setCreateTimeStr(String createTimeStr) {
    this.createTimeStr = DateUtils.longTime2String(this.getCreateTime());
  }

  public String getNextRunStr() {
    if (this.getNextRun() == null||this.getNextRun()==0) {
      return "-";
    }
    return DateUtils.longTime2String(this.getNextRun());
  }

  public void setNextRunStr(String nextRunStr) {
    this.nextRunStr = nextRunStr;
  }


  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }

  public String getDsType() {
    return dsType;
  }

  public void setDsType(String dsType) {
    this.dsType = dsType;
  }

  public int getStatus() {
    return status;
  }

  public void setStatus(int status) {
    this.status = status;
  }

  public String getLmUserId() {
    return lmUserId;
  }

  public void setLmUserId(String lmUserId) {
    this.lmUserId = lmUserId;
  }

  public Long getLmTime() {
    return lmTime;
  }

  public void setLmTime(Long lmTime) {
    this.lmTime = lmTime;
  }

  public String getLmTimeStr() {
    if (this.getLmTime() == null) {
      return "";
    }
    return DateUtils.longTime2String(this.getLmTime());
  }

  public void setLmTimeStr(String lmTimeStr) {
    this.lmTimeStr = DateUtils.longTime2String(this.getLmTime());
  }

  public String getCreateUserName() {
    return createUserName;
  }

  public void setCreateUserName(String createUserName) {
    this.createUserName = createUserName;
  }

  public Map<String, String> getDataSourceTypeMap() {
    return dataSourceTypeMap;
  }

  public String getBackupStrategyId() {
    return backupStrategyId;
  }

  public void setBackupStrategyId(String backupStrategyId) {
    this.backupStrategyId = backupStrategyId;
  }

  public String getBackupType() {
    return backupType;
  }

  public void setBackupType(String backupType) {
    this.backupType = backupType;
  }

  public Long getBackupTime() {
    return backupTime;
  }

  public void setBackupTime(Long backupTime) {
    this.backupTime = backupTime;
  }

  public Integer getBackupTimeStatus() {
    return backupTimeStatus;
  }

  public void setBackupTimeStatus(Integer backupTimeStatus) {
    this.backupTimeStatus = backupTimeStatus;
  }

  public Integer getBackupCycle() {
    return backupCycle;
  }

  public void setBackupCycle(Integer backupCycle) {
    this.backupCycle = backupCycle;
  }

  public String getBackupPeriod() {
    return backupPeriod;
  }

  public void setBackupPeriod(String backupPeriod) {
    this.backupPeriod = backupPeriod;
  }

  public Map<String, String> getBackupTypeMap() {
    return backupTypeMap;
  }

  public Map<String, String> getBackupPeriodMap() {
    return backupPeriodMap;
  }

  public Map<String, String> getBackupTimeStatusMap() {
    return backupTimeStatusMap;
  }

  
  public Map<Integer, String> getDataSourceRunStatusMap() {
    return dataSourceRunStatusMap;
  }


  public Map<Integer, String> getDatasourceDsStatusMap() {
    return datasourceDsStatusMap;
  }

  public int getDsStatus() {
    return dsStatus;
  }

  public void setDsStatus(int dsStatus) {
    this.dsStatus = dsStatus;
  }


  @Override
  public String toString() {
    return "DatasourceBean [id=" + id + ", customerId=" + customerId + ", terminalId=" + terminalId
        + ", name=" + name + ", createUserId=" + createUserId + ", createTime=" + createTime
        + ", createTimeStr=" + createTimeStr + ", description=" + description
        + ", isOpenLocalBackup=" + isOpenLocalBackup + ", dsType=" + dsType + ", dsSecurityRank="
        + dsSecurityRank + ", status=" + status + ", dsStatus=" + dsStatus + ", lmUserId="
        + lmUserId + ", lmTime=" + lmTime + ", lmTimeStr=" + lmTimeStr + ", spaceUsage="
        + spaceUsage + ", nextRun=" + nextRun + ", nextRunStr=" + nextRunStr + ", count=" + count
        + ", currentVersionMajor=" + currentVersionMajor + ", currentVersionMinor="
        + currentVersionMinor + ", bindDeviceName=" + bindDeviceName + ", backupStrategyId="
        + backupStrategyId + ", backupType=" + backupType + ", backupTime=" + backupTime
        + ", backupTimeStatus=" + backupTimeStatus + ", backupCycle=" + backupCycle
        + ", backupPeriod=" + backupPeriod + ", configId=" + configId + ", scanType=" + scanType
        + ", isEncrypt=" + isEncrypt + ", root=" + root + ", scanHideFile=" + scanHideFile
        + ", verifyCompleteName=" + verifyCompleteName + ", verifyCompleteMaxCount="
        + verifyCompleteMaxCount + ", verifyCompleteTimer=" + verifyCompleteTimer
        + ", fileAttrGainer=" + fileAttrGainer + ", recordCanNotReadFileInfo="
        + recordCanNotReadFileInfo + ", recordEmptyDirectory=" + recordEmptyDirectory
        + ", recordEmptyFile=" + recordEmptyFile + ", filterFileSuffix=" + filterFileSuffix
        + ", dbUsername=" + dbUsername + ", dbPassword=" + dbPassword + ", dbType=" + dbType
        + ", dbHost=" + dbHost + ", dbPort=" + dbPort + ", dbName=" + dbName + ", createUserName="
        + createUserName + ", dataSourceRunStatusMap=" + dataSourceRunStatusMap
        + ", datasourceDsStatusMap=" + datasourceDsStatusMap + ", dataSourceTypeMap="
        + dataSourceTypeMap + ", backupTypeMap=" + backupTypeMap + ", backupPeriodMap="
        + backupPeriodMap + ", backupTimeStatusMap=" + backupTimeStatusMap + "]";
  }
}
